package diplomovka.graphCreator.modelParts;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MMethod {
	private String name;
	private List<MAnnotation> annotations = new ArrayList<MAnnotation>();
	private List<MException> exceptions = new ArrayList<MException>();
	private int modifiers;
	private Map<String, Class> parameters = new HashMap<String, Class>();
	private Class returnType;
	private Object defaultValue;
	private boolean isInWebServiceConfigFile = false;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	public List<MAnnotation> getAnnotations() {
		return annotations;
	}
	public void addAnnotation(MAnnotation annotation) {
		annotations.add(annotation);
	}

	public List<MException> getExceptions() {
		return exceptions;
	}
	public void addException(MException exception) {
		exceptions.add(exception);
	}

	public int getModifiers() {
		return modifiers;
	}

	public void setModifiers(int modifiers) {
		this.modifiers = modifiers;
	}

	public Map<String, Class> getParameters() {
		return parameters;
	}
	public void addParameter(String name, Class parameter) {
		parameters.put(name, parameter);
	}

	public Class getReturnType() {
		return returnType;
	}

	public void setReturnType(Class returnType) {
		this.returnType = returnType;
	}

	public Object getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(Object defaultValue) {
		this.defaultValue = defaultValue;
	}

	public boolean isInWebServiceConfigFile() {
		return isInWebServiceConfigFile;
	}

	public void setInWebServiceConfigFile(boolean isInWebServiceConfigFile) {
		this.isInWebServiceConfigFile = isInWebServiceConfigFile;
	}
	
}
